// 引入lodash工具库 
var _ = require('lodash');
// console.log(_);
var obj = {
    name: "zhangsan"
};
var obj1 = _.cloneDeep(obj);//深拷贝 
console.log(obj, obj1, obj1 === obj);

// var arr = [1,2,3,4,5,6];
// console.log(_.chunk(arr,2));

// compact 过滤假值将真值放在数组中 
var arr = [0, false, '', 10, null, undefined, 'hello'];
console.log(_.compact(arr));


// drop 删除数组元素 指定删除n
console.log(_.drop([1, 2, 3, 4, 5], 2));
console.log(_.indexOf([1, 2, 3, 4, 5], 3));
console.log(_.uniq([1, 2, 2, 1, 3]));


// 作业：尽可能使用学过数组api对数组进行去重 [1,2,3,2,3]